Skip to content

Filter ref#711

Draft
GeorgyKirichenko wants to merge 17 commits intomainfrom
filter-ref
Draft

Filter ref#711
GeorgyKirichenko wants to merge 17 commits intomainfrom
filter-ref

Conversation

@GeorgyKirichenko
Copy link
Copy Markdown
Contributor

No description provided.

When a device was not used while filter initialization use a default
one value
This is obsolete and produces invalid values while query
The attributes use b-tree internal structure what is x86-specific
implemented. Also b-tree lookup is slower that direct table lookups.
This is a preparation commit introducing an attribute compilation
primitives. The commit introduces a some sort of polymorphism required
to get rid of filter library hard-coded filter rule format and packet
handling.
@GeorgyKirichenko GeorgyKirichenko force-pushed the filter-ref branch 2 times, most recently from 3cfb936 to 3cf6bfd Compare May 4, 2026 08:43
@GeorgyKirichenko GeorgyKirichenko force-pushed the filter-ref branch 2 times, most recently from e00ed14 to 6beb0fc Compare May 4, 2026 12:07
Filter logic implies the following logic:
 - each attribute definition area is split into regions with unique set of
   rule set corresponding to the region
 - each rule gets a list of region identifiers for each attribute
 - combine pairs of attributes into sets of next level identifiers
 - the last stage resolves corresponding rule index

So in case of 5 attributes compilation schema for a rule looks like
a0, a1, a2, a3, a4 -> sets of range identifiers matching to the rule
produce a5 = a0 * a1, a6 = a2 * a3, a7 = a4 * a5 where ai * aj if s full
join of containing values
after then we set rule index for each pair in set of a6 * a7.

The logic consist of three stages
 - initialize all the attributes and touch regions for all rules. The stage
   result in enumerate all regions with values defining of unique rule set
   identifier. Also we collect region values for each rule into registries.
 - merge pairs of values into a new ones
 - after only two set of identifiers remained - the last one merge will set
   a rule index into corresponding table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant